package com.hd.core.project.module.domain;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * 文件资料-教师数据实体
 */
@TableName("module_edu_upload_data_teacher")
public class EduUploadDataTeacher {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String name;

    //对应的账号id,这里是为了避免有name名称是相同的而无法区分的问题
    private Long userId;

    //文件对应的年份
    private Integer year;

    //文件对应的月份
    private Integer month;

    /**
     * 下面六个属性分别代表了 六种文件资料
     * 详细编号 1-6 {@link EduUploadDataTitle#type}
     */
    private String dateTypeOne;

    private String dateTypeTwo;

    private String dateTypeThree;

    private String dateTypeFour;

    private String dateTypeFive;

    private String dateTypeSix;

    public EduUploadDataTeacher() {
    }

    public EduUploadDataTeacher(
            String name, Long userId, Integer year,
            Integer month, Integer dataTypeId,String dataTypeData) {
        this.name = name;
        this.userId = userId;
        this.year = year;
        this.month = month;
        this.setDataTypeByTypeId(dataTypeId,dataTypeData);
    }

    /**
     * 根据对应的id 设置 到对应的成员属性上
     * @param typeId 类型id
     * @param typeData 类型数据
     */
    private void setDataTypeByTypeId(Integer typeId,String typeData){
        switch (typeId){
            case 1:
                this.setDateTypeOne(typeData);
                break;
            case 2:
                this.setDateTypeTwo(typeData);
                break;
            case 3:
                this.setDateTypeThree(typeData);
                break;
            case 4:
                this.setDateTypeFour(typeData);
                break;
            case 5:
                this.setDateTypeFive(typeData);
                break;
            default:
                this.setDateTypeSix(typeData);
        }
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public String getDateTypeOne() {
        return dateTypeOne;
    }

    public void setDateTypeOne(String dateTypeOne) {
        this.dateTypeOne = dateTypeOne;
    }

    public String getDateTypeTwo() {
        return dateTypeTwo;
    }

    public void setDateTypeTwo(String dateTypeTwo) {
        this.dateTypeTwo = dateTypeTwo;
    }

    public String getDateTypeThree() {
        return dateTypeThree;
    }

    public void setDateTypeThree(String dateTypeThree) {
        this.dateTypeThree = dateTypeThree;
    }

    public String getDateTypeFour() {
        return dateTypeFour;
    }

    public void setDateTypeFour(String dateTypeFour) {
        this.dateTypeFour = dateTypeFour;
    }

    public String getDateTypeFive() {
        return dateTypeFive;
    }

    public void setDateTypeFive(String dateTypeFive) {
        this.dateTypeFive = dateTypeFive;
    }

    public String getDateTypeSix() {
        return dateTypeSix;
    }

    public void setDateTypeSix(String dateTypeSix) {
        this.dateTypeSix = dateTypeSix;
    }
}
